<template>
  <div class="nav-content">
    <div class="nav-content-top clearfix">
      <h3>{{ dataInfo && dataInfo[index] }}</h3>

      <div class="right">
        当前位置: {{ Object.keys(userInfo)[0] }} >
        {{ dataInfo && dataInfo[index] }}
      </div>
    </div>
    <div class="news-title">
      <ul>
        <li class="clearfix" v-for="item in 10" :key="item">
          <span class="list-title"
            >2019年小型中子源研讨会在清华大学工程物理系召开</span
          >
          <span class="list-time">2019-01-22</span>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  name: "Nav-Content",
  props: {
    // title: {
    //   type: String,
    //   default: () => {
    //     return "科研项目";
    //   },
    // },
  },
  data() {
    return {};
  },
  computed: {
    ...mapState({
      index: (state) => state.clickIndex,
      dataInfo: (state) =>
        state.h_data[Object.keys(state.h_data) && Object.keys(state.h_data)[0]],
      userInfo: (state) => state.h_data,
    }),
  },
  methods: {},
};
</script>


<style lang="less" scoped>
.clearfix:after {
  visibility: hidden;
  display: block;
  font-size: 0;
  content: " ";
  clear: both;
  height: 0;
}
.nav-content {
  width: 880px;
  //   margin-top: 50px;
  padding-top: 50px;
  padding-left: 22px;
  border-left: 1px solid #eee3f0;
  float: right;
  .nav-content-top {
    line-height: 40px;
    h3 {
      font-size: 24px;

      float: left;
      border-bottom: 1px solid #eee3f0;
    }
    .right {
      float: right;
    }
  }
  .news-title {
    li {
      width: 100%;
      height: 54px;
      line-height: 54px;
      cursor: pointer;
      background: url("../../assets/images/list-border.png") repeat-x 0 52px;
      .list-title {
        float: left;
      }
      .list-time {
        float: right;
      }
    }
    text-align: left;
    margin-top: 18px;
  }
}
</style>